<template>
    <div id="sider">
        <ul v-infinite-scroll="load" class="infinite-list" style="overflow: auto">
            <li v-for="i in count" :key="i" class="infinite-list-item">{{ i }}</li>
        </ul>
    </div>
</template>

<script setup>
const count = ref(0)
const load = () => {
  count.value += 2
}
</script>

<style>
#sider{
    width: 100%;
    height: 100%;
}
.infinite-list {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  list-style: none;
}
.infinite-list .infinite-list-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  background: var(--el-color-primary-light-9);
  margin: 10px;
  color: var(--el-color-primary);
}
.infinite-list .infinite-list-item + .list-item {
  margin-top: 10px;
}
</style>